import Layout from '@/views/layout'
import Layout2 from '@/views/layout/index2'

const datahzRouter = {
  path: '/dataManagement',
  component: Layout2,
  name: 'dataManagement',
  needAuth: true,
  meta: { title: '数据管理', icon: 'data-icon' },
  children: []
}
const quarantineManage = {
  path: '/quarantineManage',
  component: Layout2,
  redirect: 'noredirect',
  name: 'quarantineManage',
  needAuth: true,
  meta: { title: '检疫疫情', icon: 'field' },
  hidden: true,
  children: [
    {
      path: '/porkerOut',
      component: Layout,
      meta: { title: '肉猪出栏分析', breadcrumb: false },
      redirect: '/porkerOut/index',
      name: 'porkerOut',
      needAuth: true,
      children: [{
        path: 'index',
        name: 'porkerOutIndex',
        component: () => import('@/views/quarantineManage/porkerOut'),
        meta: { title: '肉猪出栏分析', noCache: true }
      }]
    },
    {
      path: '/livepigQuarantine',
      component: Layout,
      meta: { title: '杏花鸡检疫数据', breadcrumb: false },
      redirect: '/livepigQuarantine/index',
      name: 'livepigQuarantine',
      needAuth: true,
      children: [{
        path: 'index',
        name: 'livepigQuarantineIndex',
        component: () => import('@/views/quarantineManage/livePig'),
        meta: { title: '杏花鸡检疫数据', noCache: true }
      }]
    },
    {
      path: '/productQuarantine',
      component: Layout,
      meta: { title: '产品检疫数据', breadcrumb: false },
      redirect: '/productQuarantine/index',
      name: 'productQuarantine',
      needAuth: true,
      children: [{
        path: 'index',
        name: 'productQuarantineIndex',
        component: () => import('@/views/quarantineManage/product'),
        meta: { title: '产品检疫数据', noCache: true }
      }]
    },
    {
      path: '/underwriting',
      component: Layout,
      meta: { title: '承保信息', breadcrumb: false },
      redirect: '/underwriting/index',
      name: 'underwriting',
      needAuth: true,
      children: [{
        path: 'index',
        name: 'underwritingIndex',
        component: () => import('@/views/insurance/underwriting'),
        meta: { title: '承保信息', noCache: true }
      }]
    },
    {
      path: '/claims',
      component: Layout,
      meta: { title: '理赔信息', breadcrumb: false },
      redirect: '/claims/index',
      name: 'claims',
      needAuth: true,
      children: [{
        path: 'index',
        name: 'claimsIndex',
        component: () => import('@/views/insurance/claims'),
        meta: { title: '理赔信息', noCache: true }
      }]
    }
  ]
}

const newsManage = {
  path: '/newsManage',
  component: Layout2,
  redirect: 'noredirect',
  name: 'newsManage',
  needAuth: true,
  meta: { title: '消息管理', icon: 'infoPush' },
  children: [
    {
      path: '/policyManage',
      component: Layout,
      meta: { title: '资讯发布', breadcrumb: false },
      redirect: '/policyManage/index',
      name: 'policyManage',
      needAuth: true,
      children: [{
        path: 'index',
        name: 'policyManageIndex',
        component: () => import('@/views/newsManage/policyManage'),
        meta: { title: '资讯发布', noCache: true }
      }, {
        path: 'add',
        name: 'policyManageAdd',
        component: () => import('@/views/newsManage/policyEdit'),
        meta: { title: '新增-资讯发布', noCache: true },
        hidden: true
      }, {
        path: 'edit',
        name: 'policyManageEdit',
        component: () => import('@/views/newsManage/policyEdit'),
        meta: { title: '编辑-资讯发布', noCache: true },
        hidden: true
      }, {
        path: 'view',
        name: 'policyManageView',
        component: () => import('@/views/newsManage/policyEdit'),
        meta: { title: '查看-资讯发布', noCache: true },
        hidden: true
      }]
    },
    {
      path: '/financeNews',
      component: Layout,
      meta: { title: '金融资讯', breadcrumb: false },
      redirect: '/financeNews/index',
      name: 'financeNews',
      needAuth: true,
      children: [{
        path: 'index',
        name: 'financeNewsIndex',
        component: () => import('@/views/newsManage/policyManage'),
        meta: { title: '金融资讯', noCache: true }
      }, {
        path: 'add',
        name: 'financeNewsAdd',
        component: () => import('@/views/newsManage/policyEdit'),
        meta: { title: '新增-金融资讯', noCache: true },
        hidden: true
      }, {
        path: 'edit',
        name: 'financeNewsEdit',
        component: () => import('@/views/newsManage/policyEdit'),
        meta: { title: '编辑-金融资讯', noCache: true },
        hidden: true
      }, {
        path: 'view',
        name: 'financeNewsView',
        component: () => import('@/views/newsManage/policyEdit'),
        meta: { title: '查看-金融资讯', noCache: true },
        hidden: true
      }]
    },
    {
      path: '/financeHomeBananer',
      component: Layout,
      meta: { title: '金融首页图', breadcrumb: false },
      redirect: '/financeHomeBananer/index',
      name: 'financeHomeBananer',
      needAuth: true,
      children: [{
        path: 'index',
        name: 'financeHomeBananerIndex',
        component: () => import('@/views/newsManage/homeBananer'),
        meta: { title: '金融首页图', noCache: true }
      }]
    },
    // {
    //   path: '/homeBananer',
    //   component: Layout,
    //   meta: { title: '首页图片', breadcrumb: false },
    //   redirect: '/homeBananer/index',
    //   name: 'homeBananer',
    //   needAuth: true,
    //   children: [{
    //     path: 'index',
    //     name: 'homeBananerIndex',
    //     component: () => import('@/views/newsManage/homeBananer'),
    //     meta: { title: '首页图片', noCache: true }
    //   }]
    // },
    // {
    //   path: '/supplyDescr',
    //   component: Layout,
    //   meta: { title: '需求供给分析描述', breadcrumb: false },
    //   redirect: '/supplyDescr/index',
    //   name: 'supplyDescr',
    //   needAuth: true,
    //   children: [{
    //     path: 'index',
    //     name: 'supplyDescrIndex',
    //     component: () => import('@/views/supplyDescr/index'),
    //     meta: { title: '需求供给分析描述', noCache: true }
    //   },
    //   {
    //     path: 'add',
    //     name: 'supplyDescrAdd',
    //     component: () => import('@/views/supplyDescr/edit'),
    //     meta: { title: '新增-需求供给分析描述', noCache: true },
    //     hidden: true
    //   },
    //   {
    //     path: 'edit',
    //     name: 'supplyDescrEdit',
    //     component: () => import('@/views/supplyDescr/edit'),
    //     meta: { title: '编辑-需求供给分析描述', noCache: true },
    //     hidden: true
    //   },
    //   {
    //     path: 'view',
    //     name: 'supplyDescrView',
    //     component: () => import('@/views/supplyDescr/edit'),
    //     meta: { title: '查看-需求供给分析描述', noCache: true },
    //     hidden: true
    //   }
    //   ]
    // }
  ]
}

export { datahzRouter, quarantineManage, newsManage }
